Optimal Prefix Codes with Fewer Distinct Codeword Lengths are Faster to Construct
نویسندگان
چکیده
A new method for constructing minimum-redundancy prefix codes is described. This method does not explicitly build a Huffman tree; instead it uses a property of optimal codes to find the codeword length of each weight. The running time of the algorithm is shown to be O(nk), which is asymptotically faster than Huffman’s algorithm when k = o(log n), where n is the number of weights and k is the number of distinct codeword lengths. We also sketch a matching lower bound of Ω(nk) for any such construction algorithm, indicating that our algorithm is asymptotically optimal in terms of n and k.
منابع مشابه
On the construction of prefix-free and fix-free codes with specified codeword compositions
We investigate the construction of prefix-free and fix-free codes with specified codeword compositions. We present a polynomial time algorithm which constructs a fix-free code with the same codeword compositions as a given code for a special class of codes called distinct codes. We consider the construction of optimal fix-free codes which minimize the average codeword cost for general letter co...
متن کاملDistribution-Sensitive Construction of Minimum-Redundancy Prefix Codes
A new method for constructing minimum-redundancy prefix codes is described. This method does not build a Huffman tree; instead it uses a property of optimal codes to find the codeword length of each weight. The running time of the algorithm is shown to be O(nk), where n is the number of weights and k is the number of different codeword lengths. When the given sequence of weights is already sort...
متن کاملMinimum Redundancy Coding for Uncertain Sources
Consider the set of source distributions within a fixed maximum relative entropy with respect to a given nominal distribution. Lossless source coding over this relative entropy ball can be approached in more than one way. A problem previously considered is finding a minimax average length source code. The minimizing players are the codeword lengths — real numbers for arithmetic codes, integers ...
متن کامل-Conjecture for Fix-Free Codes
A fix-free code is a code, which is prefix-free and suffix-free, i.e. any codeword of a fix-free code is neither a prefix, nor a suffix of another codeword. Fix-free codes were first introduced by Schützenberg (4) and Gilbert and Moore (5), where they were called never-self-synchronizing codes. Ahlswede, Balkenhol and Khachatrian propose in (6) the conjecture that a Kraftsum of a lengths sequen...
متن کاملBounds on Generalized Huffman Codes
New lower and upper bounds are obtained for the compression of optimal binary prefix codes according to various nonlinear codeword length objectives. Like the coding bounds for Huffman coding — which concern the traditional linear code objective of minimizing average codeword length — these are in terms of a form of entropy and the probability of the most probable input symbol. As in Huffman co...
متن کامل